#ifndef _IM_SERVER_REST_API_ADAPTER_H_
#define _IM_SERVER_REST_API_ADAPTER_H_

#include <stdint.h>
#include <string>
#include <vector>
#include <map>

#include "ImServiceCommon_types.h"

namespace imserver {

class RestApiAdapter {
public:
  RestApiAdapter() {}


  int Get(int64_t qid, UserProfile * user) const;
  int BatchGet(const std::vector<int64_t> & qids, UserProfileMap * users) const;
  int GetByTickets(const std::string & Q, const std::string & T, UserProfile * user) const;

private:
  std::string CurlGet(const std::string & url, const std::map<std::string, std::string> & post_args) const;
};

}

#endif // _IM_SERVER_REST_API_ADAPTER_H_

